1. Field of Invention
The present invention relates generally to mass digital data storage systems. More particularly, the present invention relates to systems and methods for efficiently enabling erase counts, which are used to allow the wear associated with storage areas in a non-volatile storage system to be spread out across substantially all storage areas, to be maintained.
2. Description of the Related Art
The use of non-volatile memory systems such as flash memory storage systems is increasing due to the compact physical size of such memory systems, and the ability for non-volatile memory to be repetitively reprogrammed. The compact physical size of flash memory storage systems facilitates the use of such storage systems in devices which are becoming increasingly prevalent. Devices which use flash memory storage systems include, but are not limited to, digital cameras, digital camcorders, digital music players, handheld personal computers, and global positioning devices. The ability to repetitively reprogram non-volatile memory included in flash memory storage systems enables flash memory storage systems to be used and reused.
In general, flash memory storage systems may include flash memory cards and flash memory chip sets. Flash memory chip sets generally include flash memory components and a controller components. Typically, a flash memory chip set may be arranged to be assembled into an embedded system. The manufacturers of such assemblies or host systems typically acquire flash memory in component-form, as well as other components, then assemble the flash memory and the other components into a host system.
Although non-volatile memory or, more specifically, flash memory storage blocks within flash memory systems may be repetitively programmed and erased, each block or physical location may only be erased a certain number of times before the block wears out, i.e., before memory begins to become smaller. That is, each block has a program and erase cycle limit. In some memory, a block may be erased up to approximately ten thousand times before the block is considered to be unusable. In other memory, a block may be erased up to approximately one hundred thousand times or even up to a million times before the block is considered to be worn out. When a block is worn out, thereby causing a loss of use or a significant degradation of performance to a portion of the overall storage volume of the flash memory system, a user of the flash memory system may be adversely affected, as for the example through the loss of stored data or the inability to store data.
The wear on blocks, or physical locations, within a flash memory system varies depending upon how much each of the blocks is programmed. If a block or, more generally, a storage element, is programmed once, then effectively never reprogrammed, the number of program and erase cycles and, hence, wear associated with that block will generally be relatively low. However, if a block is repetitively written to and erased, e.g., cycled, the wear associated with that block will generally be relatively high. As logical block addresses (LBAs) are used by hosts, e.g., systems which access or use a flash memory system, to access data stored in a flash memory system, if a host repeatedly uses the same LBAs to write and overwrite data, the same physical locations or blocks within the flash memory system are repeatedly written to and erased, as will be appreciated by those of skill in the art.
When some blocks are effectively worn out while other blocks are relatively unworn, the existence of the worn out blocks generally compromises the overall performance of the flash memory system. In addition to degradation of performance associated with worn out blocks themselves, the overall performance of the flash memory system may be compromised when an insufficient number of blocks which are not worn out are available to store desired data. Often, a flash memory system may be deemed unusable when a critical number worn out blocks are present in the flash memory system, even when many other cells in the flash memory system are relatively unworn. When a flash memory system which includes a substantial number of relatively unworn blocks is considered to be unusable, many resources associated with the flash memory system are effectively wasted.
In order to increase the likelihood that blocks within a flash memory system are worn fairly evenly, wear leveling operations are often performed. Wear leveling operations, as will be understood by those skilled in the art, are generally arranged to allow the physical locations or blocks which are associated with particular LBAs to be changed such that the same LBAs are not always associated with the same physical locations or blocks. By changing the block associations of LBAs, it is less likely that a particular block may wear out well before other blocks wear out.
One conventional wear leveling process involves swapping physical locations to which two relatively large portions of customer or host LBAs are mapped. That is, the LBAs associated with relatively large sections of storage cells are swapped. Such swapping is initiated through a manual command from a customer, e.g., through the use of a host and, as a result, is not transparent to the customer. Also, swapping operations that involve moving data between two relatively large sections of storage cells are time consuming and, hence, inefficient. Additionally, the performance of the overall flash memory system may be adversely affected by swapping operations of a relatively long duration which consume significant resources associated with the overall flash memory system. As will be appreciated by those skilled in the art, moving data from a first location typically involves copying the data into another location and erasing the data from the first location.
Another conventional wear leveling process involves allowing blocks to wear. Once the blocks have effectively worn out, the sectors assigned to the blocks may be reassigned by mapping the addresses associated with the sectors to spare areas once the blocks in which the sectors have been stored have worn out, or have become unusable. As the number of spare areas or blocks is limited and valuable, there may not always be spare areas to which sectors associated with unusable blocks may be mapped. In addition, effectively remapping sectors only after blocks have become unusable generally allows performance of the overall flash memory system to degrade.
Therefore, what are desired are a method and an apparatus for efficiently and substantially transparently performing wear leveling within a flash memory storage system. That is, what is needed is a system which facilitates a wear leveling process which promotes more even wear in physical locations associated with the flash memory storage system without requiring a significant use of computational resources.
The present invention relates to a system and a method for storing erase counts in an erase count block (ECB) of a non-volatile memory device. According to one aspect of the present invention, a data structure (e.g., an ECB) in a non-volatile memory includes a first indicator that provides an indication of a number of times a first block of a plurality of blocks in a non-volatile memory has been erased. The data structure also includes a header that is arranged to contain information relating to the blocks in the non-volatile memory. In one embodiment, the data structure also include a second indicator that provides an indication that a second block of the plurality of blocks is unusable. In another embodiment, the header includes an average erase count that indicates an average number of times each block in the plurality of blocks has been erased.
Maintaining a block in a non-volatile memory device which includes information pertaining the lifetimes available in physical blocks of a non-volatile memory system allows the lifetime of a physical block, even an erased physical block, to be efficiently determined. Specifically, by storing the erase counts of substantially all physical blocks which have an associated erase count, or an indicator which identifies how many times a particular block has been erased, in an erase count block, the erase count of substantially any block may be determined by reading the appropriate erase count entry from the erase count block. As such, the number of erase cycles already undergone by a given block may be readily ascertained. Indications of whether particular blocks are unusable, e.g., have factory defects or growing defects, may also be stored in the erase count block to enable it to be readily determined whether particular blocks are usable.
According to another aspect of the present invention, an erase count clock arranged in a non-volatile flash memory device includes a first page which has a first identifier for a first physical block of a non-volatile memory. The first identifier identifies a number of times the first physical block has been erased. The erase count block also includes a second page which has a count that indicates an average number of times physical blocks within the non-volatile memory have been erased.
In one embodiment, the first page is divided into a plurality of groups of bytes such that a first group of bytes includes the first identifier. In such an embodiment, each of the plurality of groups of bytes may include between approximately 3 bytes and approximately 4 bytes.
According to another aspect of the present invention, a non-volatile memory system includes a non-volatile memory which has a plurality of blocks, a system memory, and means for indicating in the system memory a number of times each usable block included in the plurality of blocks has been erased. In one embodiment, the system also includes means for indicating in the system memory an average number of times each block included in the plurality of blocks has been erased.
These and other advantages of the present invention will become apparent upon reading the following detailed descriptions and studying the various figures of the drawings.